Use system_timer instead of deprecated deadline_timer#1874
Use system_timer instead of deprecated deadline_timer#1874heifner wants to merge 2 commits intoAntelopeIO:mainfrom
Conversation
|
I am not sure The most consistent choice would probably be to use Related #1830 |
In tests I have seen the |
|
It's the ambiguous inconsistency that is my concern. I just tried #include <chrono>
#include <iostream>
int main() {
using namespace std::chrono;
std::cout << "Period: " << high_resolution_clock::period::num << "/" << high_resolution_clock::period::den << " seconds\n";
std::cout << "Is steady: " << high_resolution_clock::is_steady << "\n";
return 0;
}and sure enough the output is different on libstdc++ vs libc++ (clang 21). The code should be explicit about what kind of clock it is getting to avoid any surprises or inconsistencies (now or in the future). Since |
Updated to use
system_timeras specified by @spoonincode. See comments below.